package xyz.weizhi.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import xyz.weizhi.pojo.Student;
import xyz.weizhi.pojo.User;

/**
 * @Author milian
 * @Date 2021/9/4 0004 20:31
 * 通过java配置spring
 */

@Configuration //这个也会给spring容器托管，注册到容器中，因为他本来就是一个component
@ComponentScan("xyz.weizhi.pojo")
@Import(weizhiConfig2.class)
public class weizhiConfig {
    @Bean
    public User getUser(){
        return new User();
    }
}
